using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class ShopMgr
{
    private static ShopMgr _instance;

    public static ShopMgr Instance
    {
        get
        {
            if (_instance == null)
            {
                _instance = new ShopMgr();
            }

            return _instance;
        }
    }

    private ShopMgr()
    {
    }

    public ShopData dimongData = new ShopData() { isVisible = true };
    public ShopData gloadData = new ShopData() { isVisible = true };
    
    public void Init()
    {
        RefreshRedPoint();
    }

    public void RefreshRedPoint()
    {
        RedPointMgr.Instance.GetNode(ERedPoint.Shop_Diamon).AddOnRedPointCheckListener(() =>
        {
            return dimongData.isVisible ? 1 : 0;
        },true);
        
        RedPointMgr.Instance.GetNode(ERedPoint.Shop_Glod).AddOnRedPointCheckListener(() =>
        {
            return gloadData.isVisible ? 1 : 0;
        },true);
    }
    
    public void Release()
    {

    }
}

public class ShopData
{
    public bool isVisible;
}